--[[

        magickey.lua
        exported by excel2lua.py
        from file:magickey.xlsx

--]]

local _data = {
  [1] = {id = 1,name = '鼠头槌',res = '1',effectId = 22,lvId = 1,desc = '上古鼠帝祭练法宝，追敌于千里之外。',lv_max = 20,},
  [2] = {id = 2,name = '仙笛',res = '2',effectId = 11,lvId = 1,desc = '仙人遗留凡世之宝，听之可使神清气爽，免除邪祟。',lv_max = 20,},
  [3] = {id = 3,name = '春秋',res = '3',effectId = 2,lvId = 1,desc = '',lv_max = 20,},
  [4] = {id = 4,name = '神农玉',res = '4',effectId = 5,lvId = 1,desc = '',lv_max = 20,},
  [5] = {id = 5,name = '枯草垛',res = '5',effectId = 4,lvId = 1,desc = '',lv_max = 20,},
  [6] = {id = 6,name = '虎符',res = '6',effectId = 13,lvId = 1,desc = '',lv_max = 20,},
  [7] = {id = 7,name = '伏羲镜',res = '7',effectId = 8,lvId = 1,desc = '',lv_max = 20,},
  [8] = {id = 8,name = '神仙像',res = '8',effectId = 12,lvId = 1,desc = '',lv_max = 20,},
  [9] = {id = 9,name = '痒痒挠',res = '9',effectId = 9,lvId = 1,desc = '',lv_max = 20,},
  [10] = {id = 10,name = '五彩神石',res = '10',effectId = 7,lvId = 1,desc = '',lv_max = 20,},
  [11] = {id = 11,name = '魔神令',res = '11',effectId = 6,lvId = 1,desc = '',lv_max = 20,},
  [12] = {id = 12,name = '飞刀',res = '12',effectId = 14,lvId = 1,desc = '',lv_max = 20,},
  [13] = {id = 13,name = '白虎玉',res = '13',effectId = 15,lvId = 1,desc = '',lv_max = 20,},
  [14] = {id = 14,name = '除魔玉',res = '14',effectId = 1,lvId = 1,desc = '',lv_max = 20,},
  [15] = {id = 15,name = '三眼巨魔像',res = '15',effectId = 16,lvId = 1,desc = '',lv_max = 20,},
  [16] = {id = 16,name = '螺书',res = '16',effectId = 17,lvId = 1,desc = '',lv_max = 20,},
  [17] = {id = 17,name = '火纹珠',res = '17',effectId = 18,lvId = 1,desc = '',lv_max = 20,},
  [18] = {id = 18,name = '阴阳符',res = '18',effectId = 1,lvId = 1,desc = '',lv_max = 20,},
  [19] = {id = 19,name = '甲虫',res = '18',effectId = 19,lvId = 1,desc = '',lv_max = 20,},
  [20] = {id = 20,name = '巨岩蜱虫',res = '20',effectId = 20,lvId = 1,desc = '',lv_max = 20,},
  [21] = {id = 21,name = '阴阳镰刀',res = '21',effectId = 21,lvId = 1,desc = '',lv_max = 20,},
  [22] = {id = 22,name = '青铜圆盾',res = '22',effectId = 21,lvId = 1,desc = '',lv_max = 20,},
}

local id_to_index={
   [1] = 1,
   [2] = 2,
   [3] = 3,
   [4] = 4,
   [5] = 5,
   [6] = 6,
   [7] = 7,
   [8] = 8,
   [9] = 9,
   [10] = 10,
   [11] = 11,
   [12] = 12,
   [13] = 13,
   [14] = 14,
   [15] = 15,
   [16] = 16,
   [17] = 17,
   [18] = 18,
   [19] = 19,
   [20] = 20,
   [21] = 21,
   [22] = 22,
}

local magickey={}

function magickey.length() 
   return #_data 
end 

function magickey.indexOf(index) 
   return _data[index] 
end 

function magickey.get(id) 
  return magickey.indexOf(id_to_index[id])
end 

return magickey